package com.hh.front.controller;

import com.hh.common.model.user.RechargedProducts;
import com.hh.common.response.CommonResult;
import com.hh.service.service.RechargedProductsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController()
@RequestMapping("api/front/rechargedProducts")
public class RechargedProductsController {

    @Autowired
    private RechargedProductsService rechargedProductsService;

    /**
     * 获取充值商品列表
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public CommonResult<List<RechargedProducts>> list(){
        return CommonResult.success(rechargedProductsService.list());
    }
}
